#include<stdio.h>
int removeDuplicates(int* a, int numsSize) {
    int i = 0, j = 1;
    while(j < numsSize){
        if(a[i] == a[j]){
            j++;
        }
        else{
            i++;
            a[i] = a[j];
            j++;
        }
    }
   
    return i + 1;
}